# -*- coding:utf-8 -*-

"""
define log format.
"""

import logging


def get_logger(abspath):
    logger = logging.getLogger(abspath)
    logger.setLevel(logging.DEBUG)

    handler = logging.StreamHandler()
    handler.setLevel(logging.DEBUG)

    formatter = logging.Formatter(
        '%(asctime)s - %(processName)s - %(threadName)s - %(filename)s:%(lineno)s - %(levelname)s - %(message)s')
    handler.setFormatter(formatter)

    logger.addHandler(handler)

    return logger
